package com.frxuexi.shop2307.adapter

import android.graphics.Paint
import androidx.databinding.DataBindingUtil
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.frxuexi.lib_base.entity.ProductBeanItem
import com.frxuexi.shop2307.R
import com.frxuexi.shop2307.databinding.ItemKillBinding
import com.frxuexi.shop2307.databinding.ItemShopBinding


class KillAdapter:BaseQuickAdapter<ProductBeanItem,BaseViewHolder>(R.layout.item_kill) {

    override fun onItemViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {
        super.onItemViewHolderCreated(viewHolder, viewType)
        DataBindingUtil.bind<ItemKillBinding>(viewHolder.itemView)
    }
    override fun convert(helper: BaseViewHolder, item: ProductBeanItem) {
        val binding = DataBindingUtil.getBinding<ItemKillBinding>(helper.itemView)!!
        binding.bean=item
//        binding.shopOldprice.paintFlags=Paint.STRIKE_THRU_TEXT_FLAG

//        binding.shopOldprice.setText("￥${item.otPrice?:item.sales}")
//        GlideUtils.getRoundImage(binding.shopIv,item.image)
    }
}